home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / wildcat / allfl_20.zip / AFLCONV.WCX (.txt) next >
Wildcat! WCX  |  1996-01-01  |  5KB  |  487 lines

  1. '! Decompiled with wccNosy version 4.20f (freeware)
  2. '! Input File: in.wcx  4886 bytes  01/28/123  10:06:42pm
  3. '! Code Segment Size  :4280 bytes
  4. '! Data Segment Size  :18957 bytes
  5. '! String Segment Size:606 bytes
  6. '! Compiled with WCC version 4.01
  7.  
  8.       Type Type33
  9.       End Type
  10.  
  11.       Type Type32
  12.         Filler0(1 To 5) As Byte
  13.         s5 As String*12
  14.         s17 As String*67
  15.         b84 As Byte
  16.         Filler85(1 To 3) As Byte
  17.         o88 As Boolean
  18.         s89 As String*79
  19.         s168 As String*12
  20.         s180 As String*67
  21.         s247 As String*79
  22.         s326 As String*67
  23.         t33_393 As Type33
  24.         Filler393(1 To 4095) As Byte
  25.         l4488 As Long
  26.       End Type
  27.  
  28.       Type Type31
  29.         t33_0(1 To 4095) As Type33
  30.       End Type
  31.  
  32.       Type Type30
  33.         s0 As String*12
  34.         s12 As String*67
  35.         b79 As Byte
  36.         Filler80(1 To 1) As Byte
  37.         s81 As String*79
  38.         s160 As String*12
  39.         s172 As String*67
  40.         Filler239(1 To 1) As Byte
  41.         s240 As String*79
  42.         t31_319 As Type31
  43.       End Type
  44.  
  45.       Type Type29
  46.         s0 As String*5
  47.         s5 As String*12
  48.         s17 As String*67
  49.         b84 As Byte
  50.         l85 As Long
  51.         s89 As String*79
  52.         s168 As String*12
  53.         s180 As String*67
  54.         s247 As String*79
  55.         s326 As String*67
  56.         t31_393 As Type31
  57.         Filler393(1 To 4095) As Byte
  58.         l4488 As Long
  59.         b4492 As Byte
  60.       End Type
  61.  
  62.       Type Type28
  63.         s0 As String*3
  64.         s3 As String*8
  65.         s11 As String*30
  66.         s41 As String*25
  67.         s66(1 To 10) As String*80
  68.         l866 As Long
  69.       End Type
  70.  
  71.       Type Type27
  72.         b0 As Byte
  73.         s1 As String*160
  74.       End Type
  75.  
  76.       Type Type26
  77.         s0 As String*25
  78.         s25 As String*10
  79.         s35 As String*15
  80.         s50 As String*70
  81.         s120 As String*70
  82.       End Type
  83.  
  84.       Declare Sub Sub749(s65534 As String)
  85.       Declare Function Func1029(i65534 As Integer) As String
  86.       Declare Function Func1201(s65534 As String) As Long
  87. '!      Declare Function Func1313(s65534 As String) As Boolean
  88.       Declare Function Func1836(l65534 As Long, l65532 As Long) As Long
  89. '!      Declare Sub Sub1889(l65534 As Long, l65532 As Long)
  90.       Declare Function Func1989(w65534 As Word) As Boolean
  91.       Declare Sub Sub2114(w65534 As Word)
  92.       Declare Sub Sub2251(w65534 As Word)
  93. '!      Declare Sub Sub2388(w65534 As Word)
  94. '!      Declare Sub Sub2490(s65534 As String)
  95.       Declare Sub Sub2567
  96.       Declare Sub Sub2641(s65534 As String)
  97. '!      Declare Sub Sub2737
  98. '!      Declare Sub Sub2762
  99.       Declare Sub Sub2782
  100.       Declare Sub Sub3216
  101.       Declare Sub Sub3709
  102.       Declare Sub Sub4016
  103.  
  104.       Dim t26_4463 As Type26
  105.       Dim t28_4653 As Type28
  106.       Dim s5533 As String
  107.       Dim t29_5537 As Type29
  108.       Dim b10032(0 To 7) As Byte
  109.       Dim b10040(0 To 7) As Byte
  110.       Dim i10048 As Integer
  111.       Dim o10050 As Boolean
  112.       Dim t32_10051 As Type32
  113.       Dim t30_14543 As Type30
  114.  
  115.       Dim s65532_ As String '! Temporary
  116.  
  117.       t26_4463.s0 = "proFILES"
  118.       t26_4463.s25 = "2.0"
  119.       t26_4463.s35 = "01/01/96"
  120.       t26_4463.s50 = "Copyright (C) 1996 Prasanth Pulavarthi. All Rights Reserved."
  121.       t26_4463.s120 = t26_4463.s0 + " " + t26_4463.s25 + " for Wildcat! 4.01+"
  122.       s5533 = ProgPath + "ALLFILES.DAT"
  123.       t29_5537.s0 = t26_4463.s25
  124.       b10032(0) = 1
  125.       b10032(1) = 2
  126.       b10032(2) = 4
  127.       b10032(3) = 8
  128.       b10032(4) = 16
  129.       b10032(5) = 32
  130.       b10032(6) = 64
  131.       b10032(7) = 128
  132.       b10040(0) = 254
  133.       b10040(1) = 253
  134.       b10040(2) = 251
  135.       b10040(3) = 247
  136.       b10040(4) = 239
  137.       b10040(5) = 223
  138.       b10040(6) = 191
  139.       b10040(7) = 127
  140.       Sub749(("PROFILES.PRM"))
  141.       If ParamCount > 0 Then
  142.         s5533 = ParamStr(1)
  143.       End If
  144.   598 o10050 = 0
  145.       If Exists(TempPath + "$AFLCONV.CNV") Then
  146.         i10048 = FreeFile
  147.         Open TempPath + "$AFLCONV.CNV" For Input As i10048
  148.         Input #i10048, s5533
  149.         If s5533 = "*__ONDEMAND__*" Then
  150.           Input #i10048, s5533
  151.           o10050 = -1
  152.         End If
  153.   704   Close i10048
  154.       End If
  155.   712 If o10050 Then
  156.         Sub4016
  157.       Else
  158.   735   Sub3709
  159.       End If
  160.   741
  161.  
  162. '! Called 1 time
  163.       Sub Sub749(s65534 As String)
  164.         If User.Language <> "" Then
  165.           If Exists(MakeWild.LanguagePath + User.Language + "\" + s65534) Then
  166.             Open MakeWild.LanguagePath + User.Language + "\" + s65534 For Random As 9 Len = 161 '! This value should probably be replaced with a "SizeOf" expression
  167.             GoTo 1026
  168.           End If
  169.         End If
  170.   890   If Exists(MakeWild.LanguagePath + s65534) Then
  171.           Open MakeWild.LanguagePath + s65534 For Random As 9 Len = 161 '! This value should probably be replaced with a "SizeOf" expression
  172.           GoTo 1026
  173.         End If
  174.   958   Error 10
  175.         Catch 10
  176.           Print "Unable to open prompt file: "; s65534
  177.           ActivityLog ProgName + " - Unable to open prompt file: " + s65534
  178.           WaitEnter 
  179.           End 
  180.         GoTo 1026
  181.  1026
  182.       End Sub
  183.  
  184. '! Called 6 times
  185.       Function Func1029(i65534 As Integer) As String
  186.         Dim s65365 As String
  187.         Dim t27_65369 As Type27
  188.  
  189.         If RIPEnabled Then
  190.           i65534 = i65534 + LOF(9) / 2
  191.         End If
  192.  1078   Get 9, i65534, t27_65369 '! 161 bytes
  193.         s65365 = Left(t27_65369.s1, t27_65369.b0)
  194.         If Left(s65365, 2) = "<<" Then
  195.           DisplayFile(Mid(s65365, 3, Len(s65365) - 2))
  196.           Func1029 = ""
  197.         Else
  198.  1178     Func1029 = s65365
  199.         End If
  200.  1186
  201.       End Function
  202.  
  203. '! Called 2 times
  204.       Function Func1201(s65534 As String) As Long
  205.         Dim l65524 As Long
  206.         Dim i65528 As Integer
  207.  
  208.         l65524 = 0
  209.         i65528 = Len(s65534)
  210.  1230   Do While i65528 > 0
  211.           l65524 = l65524 + Asc(Mid(s65534, i65528, 1))
  212.           i65528 = i65528 - 1
  213.         Loop
  214.  1295   Func1201 = l65524
  215.       End Function
  216.  
  217. '! Called 0 times
  218. '!      Function Func1313(s65534 As String) As Boolean
  219. '!        Dim s65513 As String '! Temporary
  220. '!        Dim l65517 As Long
  221. '!        Dim s65519 As String '! Temporary
  222. '!        Dim i65521 As Integer
  223. '!        Dim s65523 As String
  224. '!        Dim i65527 As Integer
  225. '!        Dim l65529 As Long
  226.  
  227. '!        Func1313 = 0
  228. '!        If Exists(ProgPath + s65534 + ".LIC") Then
  229. '!          Open ProgPath + s65534 + ".LIC" For Random As 1 Len = 880 '! This value should probably be replaced with a "SizeOf" expression
  230. '!          Get 1, -1, t28_4653 '! 880 bytes
  231. '!          Close 1
  232. '!          If t28_4653.s0 <> "LIC" Then
  233. '!          Else
  234. '! 1433       If t28_4653.s3 <> s65534 Then
  235. '!            Else
  236. '! 1463         If UCase(t28_4653.s11) <> UCase(MakeWild.BBSName) Then
  237. '!              Else
  238. '! 1503           If UCase(t28_4653.s41) <> UCase(MakeWild.SysopName) Then
  239. '!                Else
  240. '! 1543
  241. '!                  l65529 = Func1201((t28_4653.s0 + t28_4653.s3 + t28_4653.s11 + t28_4653.s41))
  242. '! 1633             For i65527 = 1 To 10 Step 1
  243. '!                    s65523 = t28_4653.s66(i65527)
  244. '!                    l65529 = l65529 + Func1201((s65523))
  245. '!                  Next
  246. '! 1787             If l65529 <> t28_4653.l866 Then
  247. '!                  Else
  248. '! 1816               Func1313 = -1
  249. '!                  End If
  250. '!                End If
  251. '!              End If
  252. '!            End If
  253. '!          End If
  254. '!        End If
  255. '! 1824
  256. '!      End Function
  257.  
  258. '! Called 1 time
  259.       Function Func1836(l65534 As Long, l65532 As Long) As Long
  260.         Func1836 = 0
  261.         If l65534 And l65532 Then
  262.           Func1836 = -1
  263.         End If
  264.  1881
  265.       End Function
  266.  
  267. '! Called 0 times
  268. '!      Sub Sub1889(l65534 As Long, l65532 As Long)
  269. '!        Dim l65524 As Long '! Temporary
  270. '!        Dim l65528 As Long '! Temporary
  271.  
  272. '!        If Func1836((l65534), (l65532)) Then
  273. '!          FlagClear l65534, l65532
  274. '!        Else
  275. '! 1971     FlagSet l65534, l65532
  276. '!        End If
  277. '! 1986
  278. '!      End Sub
  279.  
  280. '! Called 1 time
  281.       Function Func1989(w65534 As Word) As Boolean
  282.         If (t29_5537.t31_393(w65534 Div 8 + 1).t33_0.??0 And b10032(w65534 Mod 8)) <> 0 Then
  283.           Func1989 = -1
  284.         Else
  285.  2100     Func1989 = 0
  286.         End If
  287.  2106
  288.       End Function
  289.  
  290. '! Called 1 time
  291.       Sub Sub2114(w65534 As Word)
  292.         t29_5537.t31_393(w65534 Div 8 + 1).t33_0.??0 = t29_5537.t31_393(w65534 Div 8 + 1).t33_0.??0 Or b10032(w65534 Mod 8)
  293.       End Sub
  294.  
  295. '! Called 1 time
  296.       Sub Sub2251(w65534 As Word)
  297.         t29_5537.t31_393(w65534 Div 8 + 1).t33_0.??0 = t29_5537.t31_393(w65534 Div 8 + 1).t33_0.??0 And b10040(w65534 Mod 8)
  298.       End Sub
  299.  
  300. '! Called 0 times
  301. '!      Sub Sub2388(w65534 As Word)
  302. '!        Dim w65532 As Word '! Temporary
  303.  
  304. '!        If Func1989((w65534)) Then
  305. '!          Sub2251((w65534))
  306. '!        Else
  307. '! 2461
  308. '!          Sub2114((w65534))
  309. '!        End If
  310. '! 2487
  311. '!      End Sub
  312.  
  313. '! Called 0 times
  314. '!      Sub Sub2490(s65534 As String)
  315. '!        Dim i65532 As Integer
  316.  
  317. '!        i65532 = FreeFile
  318. '!        Open ProgPath + "PROFILES.LOG" For Append As i65532
  319. '!        Print #i65532, "      * "; s65534
  320. '!        Close i65532
  321. '!      End Sub
  322.  
  323. '! Called 4 times
  324.       Sub Sub2567
  325.         Dim i65534 As Integer
  326.  
  327.         i65534 = FreeFile
  328.         Open ProgPath + "PROFILES.LOG" For Append As i65534
  329.         Print #i65534, String(79, "-")
  330.         Close i65534
  331.       End Sub
  332.  
  333. '! Called 4 times
  334.       Sub Sub2641(s65534 As String)
  335.         Dim t65528 As Time
  336.         Dim i65532 As Integer
  337.  
  338.         i65532 = FreeFile
  339.         CurrentTime t65528
  340.         Open ProgPath + "PROFILES.LOG" For Append As i65532
  341.         Print #i65532, FormatTime(t65528, "hh:mm"); " "; s65534
  342.         Close i65532
  343.       End Sub
  344.  
  345. '! Called 0 times
  346. '!      Sub Sub2737
  347. '!        ActivityLog ProgName + " ERROR - See PROFILES.LOG for info."
  348. '!      End Sub
  349.  
  350. '! Called 0 times
  351. '!      Sub Sub2762
  352. '!        Delay 0
  353. '!      End Sub
  354.  
  355. '! Called 1 time
  356.       Sub Sub2782
  357.         Dim s65532 As String '! Temporary
  358.         Dim i65534 As Integer '! Temporary
  359.  
  360.         SubText 1, s5533
  361.         SubText 2, t26_4463.s25
  362.         Print Func1029((4));
  363.         i10048 = FreeFile
  364.         Open s5533 For Random As i10048 Len = 4414 '! This value should probably be replaced with a "SizeOf" expression
  365.         Get i10048, -1, t30_14543 '! 4414 bytes
  366.         Close i10048
  367.         t29_5537.s5 = t30_14543.s0
  368.         t29_5537.s17 = t30_14543.s12
  369.         t29_5537.b84 = t30_14543.b79
  370.         t29_5537.s89 = t30_14543.s81
  371.         t29_5537.s168 = t30_14543.s160
  372.         t29_5537.s180 = t30_14543.s172
  373.         t29_5537.s247 = t30_14543.s240
  374.         t29_5537.t31_393 = t30_14543.t31_319 '! 4095 bytes
  375.         FlagSet t29_5537.l4488, 512
  376.         t29_5537.b4492 = 0
  377.         i10048 = FreeFile
  378.         Open s5533 For Random As i10048 Len = 4495 '! This value should probably be replaced with a "SizeOf" expression
  379.         Put i10048, -1, t29_5537 '! 4495 bytes
  380.         Close i10048
  381.         Print Func1029((5))
  382.         Sub2567
  383.         Sub2641((s5533 + " converted to v" + t26_4463.s25 + " config format."))
  384.       End Sub
  385.  
  386. '! Called 1 time
  387.       Sub Sub3216
  388.         Dim s65532 As String '! Temporary
  389.         Dim i65534 As Integer '! Temporary
  390.  
  391.         SubText 1, s5533
  392.         SubText 2, t26_4463.s25
  393.         Print Func1029((4));
  394.         i10048 = FreeFile
  395.         Open s5533 For Random As i10048 Len = 4492 '! This value should probably be replaced with a "SizeOf" expression
  396.         Get i10048, -1, t32_10051 '! 4492 bytes
  397.         Close i10048
  398.         t29_5537.s5 = t32_10051.s5
  399.         t29_5537.s17 = t32_10051.s17
  400.         t29_5537.b84 = t32_10051.b84
  401.         If t32_10051.o88 Then
  402.           FlagSet t29_5537.l85, 16
  403.         End If
  404.  3415   t29_5537.s89 = t32_10051.s89
  405.         t29_5537.s168 = t32_10051.s168
  406.         t29_5537.s180 = t32_10051.s180
  407.         t29_5537.s247 = t32_10051.s247
  408.         t29_5537.s326 = t32_10051.s326
  409.         t29_5537.t31_393 = t32_10051.t33_393 '! 4095 bytes
  410.         t29_5537.l4488 = t32_10051.l4488
  411.         t29_5537.b4492 = 0
  412.         i10048 = FreeFile
  413.         Open s5533 For Random As i10048 Len = 4495 '! This value should probably be replaced with a "SizeOf" expression
  414.         Put i10048, -1, t29_5537 '! 4495 bytes
  415.         Close i10048
  416.         Print Func1029((5))
  417.         Sub2567
  418.         Sub2641((s5533 + " converted to v" + t26_4463.s25 + " config format."))
  419.       End Sub
  420.  
  421. '! Called 1 time
  422.       Sub Sub3709
  423.         Dim s65524 As String '! Temporary
  424.         Dim i65526 As Integer '! Temporary
  425.         Dim l65528 As Long
  426.         Dim l65532 As Long
  427.  
  428.         If Exists(s5533) Then
  429.           i10048 = FreeFile
  430.           Open s5533 For Binary As i10048
  431.           l65532 = LOF(i10048)
  432.           Close i10048
  433.           l65528 = l65532
  434.           If l65528 = 4495 Then
  435.           Else
  436.  3814       If l65528 = 4492 Then
  437.               Sub3216
  438.             Else
  439.  3842         If l65528 = 4414 Then
  440.                 Sub2782
  441.               Else
  442.  3870
  443.                 Print Func1029((6))
  444.                 Sub2567
  445.                 Sub2641((s5533 + " is an unknown format. Unable to convert to v" + t26_4463.s25 + "."))
  446.                 i10048 = FreeFile
  447.                 Open TempPath + "$AFLCONV.CNV" For Output As i10048
  448.                 Print #i10048, " "
  449.                 Close i10048
  450.                 WaitEnter 
  451.               End If
  452.             End If
  453.           End If
  454.         End If
  455.  4013
  456.       End Sub
  457.  
  458. '! Called 1 time
  459.       Sub Sub4016
  460.         Dim s65524 As String '! Temporary
  461.         Dim i65526 As Integer '! Temporary
  462.         Dim l65528 As Long
  463.         Dim l65532 As Long
  464.  
  465.         If Exists(s5533) Then
  466.           i10048 = FreeFile
  467.           Open s5533 For Binary As i10048
  468.           l65532 = LOF(i10048)
  469.           Close i10048
  470.           l65528 = l65532
  471.           If l65528 = 4331 Then
  472.           Else
  473.  4121
  474.             Print Func1029((6))
  475.             Sub2567
  476.             Sub2641((s5533 + " is an unknown format. Unable to convert to OnDemand v" + t26_4463.s25 + "."))
  477.             i10048 = FreeFile
  478.             Open TempPath + "$AFLCONV.CNV" For Output As i10048
  479.             Print #i10048, "*__ONDEMAND__*"
  480.             Print #i10048, " "
  481.             Close i10048
  482.             WaitEnter 
  483.           End If
  484.         End If
  485.  4277
  486.       End Sub
  487.